home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_200
/
271_02
/
_getdi.doc
next >
Wrap
Text File
|
1987-08-18
|
1KB
|
39 lines
NAME
_getdi -- get device information for file handle
SYNOPSIS
r = _getdi(fh);
int r; status byte, low 8 bits only
int fh; DOS file handle to investigate
DESCRIPTION
This function returns the lower 8 bits of the control word for
the specified file handle, usually stdout, stdin, or one of the
other standard channels. Note that a file handle, NOT file
descriptor is required. Refer to the DOS manual for the
description of all the bits. Bit 7 set indicates a character
device, and bits 0,1 refer to the console. This function
is called by iscons().
EXAMPLE
int r;
int fh;
fh = fileno(stdout); /* get file handle for stdout */
r = _getdi(fh);
if(r >= 0x80) printf("stdout is a character device");
This function is found in SMTCx.LIB for the Turbo-C Compiler